import { ConditionType } from "./const/ConditionType";
import { IConditionData } from "./const/IConditionData";
import { HPCond } from "./subs/HPCond";
import { ProbilityCond } from "./subs/ProbilityCond";

/**
 * 条件生成器
 */
export class ConditionCreator {

    static createCond(data: IConditionData) {
        let type = data.conditionType;
        switch (type) {
            case ConditionType.hp:
                return new HPCond(data)
            case ConditionType.probability:
                return new ProbilityCond(data)
        }
        return null;
    }
}